<#assign domain="${ctx.contextPath}" />
<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<meta http-equiv="x-ua-compatible" content="IE=Edge, chrome=1"/>
	<meta name="renderer" content="webkit">
	<title>scoreCard2</title>
	<link rel="stylesheet" href="${domain}/static/css/common/bootstrap.min.css">
	<link rel="stylesheet" href="${domain}/static/css/common/base.css">
	<link rel="stylesheet" href="${domain}/static/css/common/header.css">
	<link rel="stylesheet" href="${domain}/static/css/chsi.css">
	<script src="${domain}/static/js/jquery-3.2.1.slim.min.js"></script>
	<script src="${domain}/static/js/bootstrap.min.js"></script>
	<script src="${domain}/static/js/jquery-3.2.1.min.js"></script>
	<script src="${domain}/static/js/bootstrap.min.js"></script>
	<link rel="stylesheet" href="${domain}/static/css/bootstrap.css">
	<link rel="stylesheet" href="${domain}/static/css/bootstrapValidator.css">
	<script src="${domain}/static/js/bootstrapValidator.js"></script>
</head>
<body>

<div class="content">
	<!--侧边导航-->
	<div class="score-card2">
		<div class="wrap">
			<form id="defaultForm" method="post" class="form-horizontal" action="${domain}/yys/loginYys">
				<h1>运营商信息查询</h1>
				<div class="form-group">
					<input type="text" class="form-control" placeholder="手机账号" name="userName" readonly="readonly" value="${USER_SCORE.phone}">
				</div>
				<div class="form-group">
					<input type="password" class="form-control" placeholder="手机密码" name="userPass">
					
					<input type="hidden" class="form-control" placeholder="id" name="id" value="${id}">
				</div>
				<div class="form-group">
					<input type="text" class="form-control" placeholder="身份证" name="identityCode" value="${USER_SCORE.idNumber}" readonly="readonly">
				</div>
				<div class="form-group">
					<input type="text" class="form-control" placeholder="真实姓名" name="realName" value="${USER_SCORE.name}" readonly="readonly">
				</div>
					<div name="signup">
           <button type="submit" class="btn btn-primary" data-loading-text="Loading..." autocomplete="off" onclick="loag()" id="btn_login" style="width:300px;margin:0 auto;display:block;">查询</button>
                </div>
			</form>
		</div>
	</div>
</div>
</body>
<script>
function loag() {
$.ajax({
                cache: true,
                type: "POST",
                url:"../antifraud/cost",
                data:{type:5},// 你的formid
                async: false,
                error: function(request) {
                },
                success: function(data) {
                if(data=='1'){
                  $("#btn_login").attr("type","");
                alert("余额不足！请联系客服！");
                }else{
                var flag = $("#defaultForm").data("bootstrapValidator").isValid();
     if(flag==true){
      var btn = $("#btn_login");
      btn.text('加载中......');
      }
                }
                }
 })



    }


$(document).ready(function() {
    $('#defaultForm').bootstrapValidator({
//        live: 'disabled',
        message: 'This value is not valid',
        feedbackIcons: {
            valid: 'glyphicon glyphicon-ok',
            invalid: 'glyphicon glyphicon-remove',
            validating: 'glyphicon glyphicon-refresh'
        },
        fields: {
            userName: {
                group: '.form-group',
                validators: {
                    notEmpty: {
                        message: '请输入手机账号'
                    },
                        stringLength: {/*长度提示*/
                            min: 1,
                            max: 30,
                            message: '输入长度过长'
                        }
                }
            },
        userPass: {
                group: '.form-group',
                validators: {
                    notEmpty: {
                        message: '请输入密码'
                    },
                        stringLength: {/*长度提示*/
                            min: 1,
                            max: 18,
                            message: '请输入11位数字'
                        }
                }
            },
        identityCode: {
                group: '.form-group',
                validators: {
                    notEmpty: {
                        message: '请输入身份证'
                    },
                        stringLength: {/*长度提示*/
                            min: 1,
                            max: 18,
                            message: '请输入11位数字'
                        }
                }
            },
        realName: {
                group: '.form-group',
                validators: {
                    notEmpty: {
                        message: '请输入真实姓名'
                    },
                        stringLength: {/*长度提示*/
                            min: 1,
                            max: 18,
                            message: '请输入11位数字'
                        }
                }
            },
          
        }
    });
});
           
</script>
</html>